export default function (http) {
  return {
    async get() {
      return await http.get('/user')
    },
    async post(data) {
      return await http.post('/user', data)
    },
    async getUserInfo(data) {
      return await http.get('/user/getUserInfo', data)
    },
    async getRoles() {
      return await http.get('/role')
    },
    async bindRole(data) {
      return await http.post('/user/bindRole', data)
    },
    /**
     * @param {*} userId 用户id
     * @param {*} enterpriseId 企业id
     * @returns
     */
    async bindEnterprise(data) {
      return await http.post('/user/bindEnterprise', data)
    },
  }
}
